package xin.nick.cloud.email.service;

import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import xin.nick.cloud.email.util.EmailSender;
import xin.nick.cloud.service.EmailService;

@Slf4j
@Service
public class EmailServiceImpl implements EmailService {

    @Autowired
    private EmailSender emailSender;

    @Override
    public boolean sendEmail(String email, String code) {
        log.info("发送邮件验证码啦~ {}:{}",email, code);

        emailSender.sendEmail(email, code);

        return true;
    }
}
